import java.util.LinkedHashMap;

public class Text {
    public static void main(String[] args) {

        student.Student student1 = new student.Student("20210569","小王");
        student.Student student2 = new student.Student("20210545","赵武");
        student.Student student3 = new student.Student("20210548","王五");
        student.Student student4 = new student.Student("20210525","赵六");
        student.Student student5 = new student.Student("20210526","张三");
        student.Student student6 = new student.Student("20210527","晓明");

        LinkedHashMap<String, String> linkedHashMap = new LinkedHashMap<>();

        linkedHashMap.put(student1.getId(),student1.getName());
        linkedHashMap.put(student2.getId(),student2.getName());
        linkedHashMap.put(student3.getId(),student3.getName());
        linkedHashMap.put(student4.getId(),student4.getName());
        linkedHashMap.put(student5.getId(),student5.getName());
        linkedHashMap.put(student6.getId(),student6.getName());

        System.out.println("获取学号20210526的学生名字:" + linkedHashMap.get("20210526"));
        System.out.println("获取学号20210548的学生名字:" + linkedHashMap.get("20210548"));
        System.out.println("获取学号20210569的学生名字:" + linkedHashMap.get("20210569"));

        System.out.print("所有学生的信息: ");
        linkedHashMap.forEach(
                (name,Id) -> System.out.print(name + ":" + Id + " ")
        );
    }
}
